Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable Continuous Queries #2200

Merged
merged 12 commits into from
Apr 8, 2015
Merged

Re-enable Continuous Queries #2200

merged 12 commits into from
Apr 8, 2015

Conversation

corylanou
Copy link
Contributor

This was previously removed due to the stateless broker refactoring. Now that brokers know about data nodes again, this was added back in.

Fixes #1666

log.Println("broker cq: no topics currently available.")
return // don't have any topics to get data urls from, give it up
}
dataURLs := topic.DataURLs()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a strange way to get the URLs. :-) I know why a topic knows about the URLs, but is there no other way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add a convenience method to the broker which is something like:

func (b *Broker) DataURLs() ([]url.URL, bool)

And then we can hide some of this searching around.

There is no other way that a broker will know about data urls right now.

@otoolep
Copy link
Contributor

otoolep commented Apr 8, 2015

I'm not sure, but is the broker-only code only supposed run on the leader broker?

@corylanou
Copy link
Contributor Author

@otoolep Only the leader broker should kick off CQ's, as we only want one person "directing traffic" with cq's. I don't think we have another way to schedule a unique job right now. Was that what you were asking?

@otoolep
Copy link
Contributor

otoolep commented Apr 8, 2015

Yes, I want to make sure that we're still only kicking off the CQ from the leader. I don't think we did anything to affect that, but wanted to be sure.

@corylanou
Copy link
Contributor Author

@otoolep correct, here are the lines that make sure that happens:

https://github.com/influxdb/influxdb/blob/renenable-cq/broker.go#L68-L70

@toddboom
Copy link
Contributor

toddboom commented Apr 8, 2015

👍

corylanou added a commit that referenced this pull request Apr 8, 2015
@corylanou corylanou merged commit 8e19d52 into master Apr 8, 2015
@corylanou corylanou deleted the renenable-cq branch April 8, 2015 23:22
mark-rushakoff pushed a commit that referenced this pull request Jan 11, 2019
…skipable

Make client generation optional via ENV variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable Continuous Query unit test
3 participants